export const listData = [
  {
    name: "当日涨跌幅",
    key: "pct",
    minVal: -20,
    maxVal: 20,
    sorter(rowA, rowB) {
      return rowA.pct - rowB.pct;
    },
    render(row) {
      return row.pct.toFixed(2) + "%";
    },
  },
  {
    name: "当日振幅",
    key: "chgpct",
    minVal: -20,
    maxVal: 20,
    sorter(rowA, rowB) {
      return rowA.chgpct - rowB.chgpct;
    },
    render(row) {
      return row.chgpct.toFixed(2) + "%";
    },
  },
  {
    name: "当日量比",
    key: "volume_ratio",
    minVal: 0,
    maxVal: 15,
    sorter(rowA, rowB) {
      return rowA.volume_ratio - rowB.volume_ratio;
    },
  },
  {
    name: "当日成交量",
    key: "volume",
    minVal: 0,
    maxVal: 1180447749,
    render(row) {
      return (row.volume / 10000).toFixed(2) + "万";
    },
  },
  {
    name: "当日成交额",
    key: "amount",
    minVal: 0,
    maxVal: 8966017806.33,
    render(row) {
      return (row.amount / 100000000).toFixed(2) + "亿";
    },
  },
  {
    name: "当日换手率",
    key: "tr",
    minVal: 0,
    maxVal: 100,
    sorter(rowA, rowB) {
      return rowA.tr - rowB.tr;
    },
    render(row) {
      return row.tr.toFixed(2) + "%";
    },
  },

  {
    name: "近5日涨跌幅",
    key: "pct5",
    minVal: -72,
    maxVal: 100,
    sorter(rowA, rowB) {
      return rowA.pct5 - rowB.pct5;
    },
    render(row) {
      return row.pct5.toFixed(2) + "%";
    },
  },
  {
    name: "近10日涨跌幅",
    key: "pct10",
    minVal: -72,
    maxVal: 200,
    sorter(rowA, rowB) {
      return rowA.pct10 - rowB.pct10;
    },
    render(row) {
      return row.pct10.toFixed(2) + "%";
    },
  },
  {
    name: "近20日涨跌幅",
    key: "pct20",
    minVal: -72,
    maxVal: 300,
    sorter(rowA, rowB) {
      return rowA.pct20 - rowB.pct20;
    },
    render(row) {
      return row.pct20.toFixed(2) + "%";
    },
  },
  {
    name: "近60日涨跌幅",
    key: "pct60",
    minVal: -80,
    maxVal: 600,
    sorter(rowA, rowB) {
      return rowA.pct60 - rowB.pct60;
    },
    render(row) {
      return row.pct60.toFixed(2) + "%";
    },
  },
  {
    name: "近120日涨跌幅",
    key: "pct120",
    minVal: -83,
    maxVal: 1400,
    sorter(rowA, rowB) {
      return rowA.pct120 - rowB.pct120;
    },
    render(row) {
      return row.pct120.toFixed(2) + "%";
    },
  },
  {
    name: "近250日涨跌幅",
    key: "pct250",
    minVal: -83,
    maxVal: 1400,
    sorter(rowA, rowB) {
      return rowA.pct250 - rowB.pct250;
    },
    render(row) {
      return row.pct250.toFixed(2) + "%";
    },
  },
  {
    name: "年初至今涨跌幅",
    key: "pct_current_year",
    minVal: -83,
    maxVal: 1400,
    sorter(rowA, rowB) {
      return rowA.pct_current_year - rowB.pct_current_year;
    },
    render(row) {
      return row.pct_current_year.toFixed(2) + "%";
    },
  },
];

export const listDataer = [
  {
    name: "市盈率TTM",
    key: "pettm",
    minVal: -2575528.94,
    maxVal: 72446.65,
    render(row) {
      return row.pettm.toFixed(2);
    },
  },
  {
    name: "净资产收益率",
    key: "roediluted",
    minVal: -284.75,
    maxVal: 282.65,
    year: "2021",
    btype: "1231",
    render(row) {
      return row.roediluted.toFixed(2) + "%";
    },
  },
  {
    name: "每股净资产",
    key: "bps",
    minVal: -7.96,
    maxVal: 99.3,
    year: "2021",
    btype: "1231",
    render(row) {
      return row.bps.toFixed(2);
    },
  },
  {
    name: "市盈率LYR",
    key: "pelyr",
    minVal: -3297.35,
    maxVal: 4813.44,
    render(row) {
      return row.pelyr.toFixed(2);
    },
  },
  {
    name: "净利润同比增长",
    key: "npay",
    minVal: -19183.64,
    maxVal: 7284.28,
    year: "2021",
    btype: "1231",
    render(row) {
      return row.npay.toFixed(2) + "%";
    },
  },
  {
    name: "每股收益",
    key: "eps",
    minVal: -4.53,
    maxVal: 12.71,
    year: "2021",
    btype: "1231",
    render(row) {
      return row.eps.toFixed(2);
    },
  },
  {
    name: "净利润",
    key: "netprofit",
    minVal: -10264365567,
    maxVal: 302513000000,
    year: "2021",
    btype: "1231",
    render(row) {
      return (row.netprofit / 100000000).toFixed(2) + "亿";
    },
  },
  {
    name: "股息收益率",
    key: "dy_l",
    minVal: 0,
    maxVal: 25.48,
    render(row) {
      return row.dy_l.toFixed(2) + "%";
    },
  },
  {
    name: "市销率(倍)",
    key: "psr",
    minVal: -6600.58,
    maxVal: 2238.19,
    render(row) {
      return row.psr.toFixed(2);
    },
  },
  {
    name: "市净率MRQ",
    key: "pb",
    minVal: -1104,
    maxVal: 295.5,
    render(row) {
      return row.pb.toFixed(2);
    },
  },
  {
    name: "营业收入",
    key: "total_revenue",
    minVal: 804192.57,
    maxVal: 2740884000000,
    year: "2021",
    btype: "1231",
    render(row) {
      return (row.total_revenue / 100000000).toFixed(2) + "亿";
    },
  },
  {
    name: "总市值",
    key: "mc",
    minVal: 65424153,
    maxVal: 2173347813780,
    render(row) {
      return (row.mc / 100000000).toFixed(2) + "亿";
    },
  },
  {
    name: "流通市值",
    key: "fmc",
    minVal: 24832685,
    maxVal: 2173347813780,
    render(row) {
      return (row.fmc / 100000000).toFixed(2) + "亿";
    },
  },
  {
    name: "总资产报酬率",
    key: "niota",
    minVal: -159.33,
    maxVal: 84.96,
    year: "2021",
    btype: "1231",
    render(row) {
      return row.niota.toFixed(2) + "%";
    },
  },
  {
    name: "营业收入同比增长",
    key: "oiy",
    minVal: -99.39,
    maxVal: 17174.82,
    render(row) {
      return row.oiy.toFixed(2) + "%";
    },
  },
];

export const listDatasan = [
  {
    name: "累计交易分享数",
    key: "deal",
    minVal: 0,
    maxVal: 598,
  },
  {
    name: "一周新增关注",
    key: "follow7d",
    minVal: 0,
    maxVal: 14629,
  },
  {
    name: "一周交易分享增长率",
    key: "deal7dpct",
    minVal: 0,
    maxVal: 400,
  },
  {
    name: "一周新增交易分享数",
    key: "deal7d",
    minVal: 0,
    maxVal: 32,
  },
  {
    name: "一周讨论增长率",
    key: "tweet7dpct",
    minVal: 0,
    maxVal: 204.81,
  },
  {
    name: "累计讨论次数",
    key: "tweet",
    minVal: 0,
    maxVal: 280881,
  },
  {
    name: "一周关注增长率",
    key: "follow7dpct",
    minVal: 0,
    maxVal: 367.56,
  },
  {
    name: "一周新增讨论数",
    key: "tweet7d",
    minVal: 0,
    maxVal: 7477,
  },
];

export const initXx = [
  {
    name: "当日涨跌幅",
    key: "pct",
    minVal: -20,
    maxVal: 20,
    title: "当日涨跌幅",
    align: "center",
  },
  {
    name: "当日振幅",
    key: "chgpct",
    minVal: -20,
    maxVal: 20,
    title: "当日振幅",
    align: "center",
  },
  {
    name: "当日量比",
    key: "volume_ratio",
    minVal: 0,
    maxVal: 15,
    title: "当日量比",
    align: "center",
  },
  {
    name: "当日成交量",
    key: "volume",
    minVal: 0,
    maxVal: 1180447749,
    title: "当日成交量",
    align: "center",
  },
  {
    name: "当日成交额",
    key: "amount",
    minVal: 0,
    maxVal: 8966017806.33,
    title: "当日成交额",
    align: "center",
  },
  {
    name: "近5日涨跌幅",
    key: "pct5",
    minVal: -72,
    maxVal: 100,
    title: "近5日涨跌幅",
    align: "center",
  },
  {
    name: "近10日涨跌幅",
    key: "pct10",
    minVal: -72,
    maxVal: 200,
    title: "近10日涨跌幅",
    align: "center",
  },
  {
    name: "近20日涨跌幅",
    key: "pct20",
    minVal: -72,
    maxVal: 300,
    title: "近20日涨跌幅",
    align: "center",
  },
  {
    name: "年初至今涨跌幅",
    key: "pct_current_year",
    minVal: -83,
    maxVal: 1400,
    title: "年初至今涨跌幅",
    align: "center",
  },
];
